package com.ludomancy.timescape;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Rectangle;
import com.ludomancy.gamelib.Widget;
import com.ludomancy.timescape.SliderWidget.SliderListener;

public class StatusBarWidget extends Widget implements SliderListener
{
	public SliderWidget timeSlider;
	
	public StatusBarWidget(Widget parent, Rectangle area)
	{
		super(parent, area);
		// create slider
		timeSlider = new SliderWidget(this, new Rectangle(0, area.height/2, getWidth(), area.height/2), this, Game.MAX_TIME, 500);
	}

	public void paint(Graphics g)
	{
		g.setColor(Color.BLACK);
		g.fillRect(0, 0, getWidth(), getHeight());
		// paint hud
	}

	public void onValueChanged(int newValue)
	{
		Game.game.setTime(newValue);
	}
}
